package com.allwees.core.mq.rabbitmq.config;

import com.allwees.core.mq.rabbitmq.exeption.RabbitListenerException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.ErrorHandler;

@Slf4j
public class RabbitListenerErrorHandler implements ErrorHandler {
    @Override
    public void handleError(Throwable ex) {
        log.error(ex.getMessage(), ex);
        throw new RabbitListenerException(ex);
    }
}
